--  Copyright (c) 2001 by Extreme Networks
--  All rights reserved.
--  $Id: SWATCH2-MIB.txt,v 1.6 2001/11/02 21:35:56 tflagg Exp $
--
-- MIB for ServiceWatch 2 Network Services health and performance monitor
--
SWATCH2-MIB DEFINITIONS ::= BEGIN

          IMPORTS
                  mgmt, NetworkAddress, IpAddress, Counter, Gauge,
                          TimeTicks
                      FROM RFC1155-SMI
                  OBJECT-TYPE
                          FROM RFC-1212
            enterprises
                FROM RFC1155-SMI
            OBJECT-TYPE
                FROM RFC-1212
--      DisplayString
--              FROM RFC1213-MIB
        TRAP-TYPE
                FROM RFC-1215;

          --  This MIB module uses the extended OBJECT-TYPE macro as
          --  defined in [14];

          --  MIB-II (same prefix as MIB-I)

--          mib-2      OBJECT IDENTIFIER ::= { mgmt 1 }

          -- textual conventions

          DisplayString ::=
              OCTET STRING
          -- This data type is used to model textual information taken
          -- from the NVT ASCII character set.  By convention, objects
          -- with this syntax are declared as having

          --
          --      SIZE (0..255)

          PhysAddress ::=
              OCTET STRING
          -- This data type is used to model media addresses.  For many
          -- types of media, this will be in a binary representation.
          -- For example, an ethernet address would be represented as
          -- a string of 6 octets.

          -- groups in MIB-II

--          system       OBJECT IDENTIFIER ::= { mib-2 1 }
--          interfaces   OBJECT IDENTIFIER ::= { mib-2 2 }
--          at           OBJECT IDENTIFIER ::= { mib-2 3 }
--          ip           OBJECT IDENTIFIER ::= { mib-2 4 }
--          icmp         OBJECT IDENTIFIER ::= { mib-2 5 }
--          tcp          OBJECT IDENTIFIER ::= { mib-2 6 }
--          udp          OBJECT IDENTIFIER ::= { mib-2 7 }
--          egp          OBJECT IDENTIFIER ::= { mib-2 8 }

          -- historical (some say hysterical)
          -- cmot      OBJECT IDENTIFIER ::= { mib-2 9 }

--          transmission OBJECT IDENTIFIER ::= { mib-2 10 }

--          snmp         OBJECT IDENTIFIER ::= { mib-2 11 }

-- MIB for the ServiceWatch Agent network services monitoring.

    --  This MIB module uses the extended OBJECT-TYPE macro as
    --  defined in [14];

    --  MIB-II (same prefix as MIB-I)


    extremenetworks     OBJECT IDENTIFIER ::= { enterprises 1916 }
    extremeMgmt         OBJECT IDENTIFIER  ::= { extremenetworks 5 }
    extremeSwatch       OBJECT IDENTIFIER ::= { extremeMgmt 5 }

    swatchMib           OBJECT IDENTIFIER ::= { extremeSwatch 3 }

    isPerf              OBJECT IDENTIFIER ::= { swatchMib 1 }

-------------------------------------------------------------------

    isTable OBJECT-TYPE
        SYNTAX  SEQUENCE OF IsEntry
        ACCESS  not-accessible
        STATUS  mandatory
        DESCRIPTION
            "The list of network servers and their
            status.  The number of entries is given
            by the value of isNumber."
        ::= { isPerf 1 }

    isEntry OBJECT-TYPE
        SYNTAX  IsEntry
        ACCESS  not-accessible
        STATUS  mandatory
        DESCRIPTION
            "An entry for a network server containing
            objects describing the health and performance
            of the network server."
        INDEX   { isRequestID }
        ::= { isTable 1 }

    IsEntry ::=
        SEQUENCE {
            isRequestID
                INTEGER,
            isRequestName
                DisplayString,
            isHostName
                DisplayString,
            isPollerType
                DisplayString,
            isPort
                INTEGER,
            isGateHostName
                DisplayString,
            isMaxWait
                INTEGER,
            isInterval
                INTEGER,
            isServiceStatus
                INTEGER,
            isError
                INTEGER,
            isErrorLevel
                INTEGER,
            isNCFails
                INTEGER,
            isResponseTimeInteger
                INTEGER,
            isBytesRead
                INTEGER,
            isRequestNumber
                INTEGER,
            isResponseType
                INTEGER,
            isResponseReason
                DisplayString,
            isIPAddress
                DisplayString
        }

    -- The isPerf group

    isRequestID OBJECT-TYPE
        SYNTAX  INTEGER (1..65535)
        ACCESS  read-only
        STATUS  mandatory
        DESCRIPTION
            "The Request ID of the ServiceWatch request."
        ::= { isEntry 1 }

    isRequestName OBJECT-TYPE
        SYNTAX  DisplayString (SIZE (0..31))
        ACCESS  read-only
        STATUS  mandatory
        DESCRIPTION
            "The name of the ServiceWatch request."
        ::= { isEntry 2 }

    isHostName OBJECT-TYPE
        SYNTAX  DisplayString (SIZE (0..128))
        ACCESS  read-only
        STATUS  mandatory
        DESCRIPTION
            "The hostname that is being monitored."
        ::= { isEntry 4 }

    isPollerType OBJECT-TYPE
        SYNTAX  DisplayString (SIZE (0..32))
        ACCESS  read-only
        STATUS  mandatory
        DESCRIPTION
            "The type of poll performed.  For example,
                        'http', or 'ftp', etc."
        ::= { isEntry 5 }

    isPort OBJECT-TYPE
        SYNTAX  INTEGER 
        ACCESS  read-only
        STATUS  mandatory
        DESCRIPTION
            "The TCP/IP or UDP/IP port number used to
            contact the network server.  You specify the port
            number to use in isURL."
        ::= { isEntry 6 }

    isGateHostName OBJECT-TYPE
        SYNTAX  DisplayString (SIZE (0..15)) 
        ACCESS  read-only
        STATUS  mandatory
        DESCRIPTION
            "If set, this host must be up before alerts are sent."
        ::= { isEntry 7 }

    isMaxWait OBJECT-TYPE
        SYNTAX  INTEGER
        ACCESS  read-only
        STATUS  mandatory
        DESCRIPTION
            "The maximum amount of time to wait before
            timing out during an attempt to perform
            a query on a server."
        ::= { isEntry 8 }

    isInterval OBJECT-TYPE
        SYNTAX  INTEGER
        ACCESS  read-only
        STATUS  mandatory
        DESCRIPTION
            "The amount of time between poll attempts."
        ::= { isEntry 9 }

    isServiceStatus OBJECT-TYPE
        SYNTAX  INTEGER {
            up(1),
            down(2),
            slow(3),
            unknown(4),
            polling(5)
        }
        ACCESS  read-only
        STATUS  mandatory
        DESCRIPTION
            "The status of the service polled."
        ::= { isEntry 10 }

    isError OBJECT-TYPE
        SYNTAX  INTEGER {
            none(1),
            connectionTimeOut(2),
            sendingTimeOut(3),
            recevingTimeOut(4),
            generalTimeOut(5),
            connectToServerFailed(6),
            sendingToServerFailed(7),
            receivingFromServerFailed(8),
            hostNameInURLNotFoundViaNameService(9),
            socketError(10),
            badProtocolType(11),
            unknownFailure(12),
            couldNotExecuteExtensibleProgram(13),
            extensionProgramSendNoResult(14),
            extendAPINotLicensed(15),
            sslFeatureNotEnabled(16),
            invalidServerResponse(17),
            protocolSpecificError(18),
            gateHostDown(19),
            sqlQueryFailed(20)
        }
        ACCESS  read-only
        STATUS  mandatory
        DESCRIPTION
            "The error that occurred (if any)."
        ::= { isEntry 11 }


    isErrorLevel OBJECT-TYPE
        SYNTAX  INTEGER
        ACCESS  read-only
        STATUS  mandatory
        DESCRIPTION
            "The error level to set when an event occurs for
             this URL (the user can specify any valid integer
             to help them determine the severity of the
             error."
        ::= { isEntry 12 }

    isNCFails OBJECT-TYPE
        SYNTAX  INTEGER
        ACCESS  read-only
        STATUS  mandatory
        DESCRIPTION
            "The number of CONSECUTIVE failures when
            attempting to complete the request to a
            network server."
        ::= { isEntry 13 }

    isResponseTimeInteger OBJECT-TYPE
        SYNTAX  INTEGER
        ACCESS  read-only
        STATUS  mandatory
        DESCRIPTION
            "The response time, in seconds, for the server
            to complete the request.  (An integer.)"
        ::= { isEntry 14 }


    isBytesRead OBJECT-TYPE
        SYNTAX  INTEGER
        ACCESS  read-only
        STATUS  mandatory
        DESCRIPTION
            "The number of data bytes read from the server
            on the last request."
        ::= { isEntry 15 }

    isRequestNumber OBJECT-TYPE
        SYNTAX  INTEGER
        ACCESS  read-only
        STATUS  mandatory
        DESCRIPTION
            "The request number (relates to isNRequests and
            isInterval."
        ::= { isEntry 16 }

    isResponseType OBJECT-TYPE
        SYNTAX  INTEGER 
        ACCESS  read-only
        STATUS  mandatory
        DESCRIPTION
            "The response type as returned from the server.
            For example 200-299 means the request succeeded,
            400-499 are bad requests, etc."
        ::= { isEntry 17 }
    
    isResponseReason OBJECT-TYPE
        SYNTAX  DisplayString (SIZE (0..127))
        ACCESS  read-only
        STATUS  mandatory
        DESCRIPTION
            "A textual description of the server's
            response type, as returned from the server.
            (This response should contain the string
            describing the responseType byte.)"
        ::= { isEntry 18 }

    isIPAddress OBJECT-TYPE
        SYNTAX  DisplayString (SIZE (0..20))
        ACCESS  read-only
        STATUS  mandatory
        DESCRIPTION
            "The IP address to which this entry's monitoring
            information pertains."
        ::= { isEntry 19 }
    
--  **********************************************************************
--  is traps (server up/down)
--  **********************************************************************


    isTraps     OBJECT IDENTIFIER ::= { swatchMib 2 }
    
    serverFailed TRAP-TYPE
        ENTERPRISE isTraps
        VARIABLES
            {
                isRequestID,
                isRequestName
                -- We'll stop here.  The user actually gets to
                -- specify which variables are sent.
            }
        DESCRIPTION
            "The network server failed to correctly reply
            to the request in the time allowed."
        --#SUMMARY "Received ServiceWatch 'down' event $E, $# args: $*"
        --#SEVERITY MAJOR
        ::= 1

    serverUp TRAP-TYPE
        ENTERPRISE isTraps
        VARIABLES
            {
                isRequestID,
                isRequestName
                -- We'll stop here.  The user actually gets to
                -- specify which variables are sent.
            }
        DESCRIPTION
            "If notifyStateChange is selected,
            the state of the network service changed from
            down to up, then a 'serverUp' trap is sent."
        --#SUMMARY "Received ServiceWatch 'up' event $E, $# args: $*"
        --#SEVERITY NORMAL
        ::= 2

END